<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"      
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:body>
        <p:dialog header="Add Receipt Detail" widgetVar="newReceiptDetailDialog" resizable="false" id="newReceiptDetailDialogID"  
                  showEffect="fade" hideEffect="explode" modal="true" >  
            <h:form id="frmNewReceiptDetailDialog">
                <p:messages id="newReceiptDetailmsgs"/> 

                <h:panelGrid id="newReceiptDetaildisplay2" cellpadding="4" columns="9" style="margin:0 auto;">

                    <h:outputLabel for="newQuantity" value="Quantity: " />
                    <p:inputText id="newQuantity" value="#{receiptBackBean.selectedReceiptDetail.quantity}" label="Quantity:" size="4"/>
                    <p:message for="newQuantity" id="newQuantitymsg" display="icon"/>

                    <h:outputLabel for="newVolHeight" value="Vol Height: " />
                    <p:inputText id="newVolHeight" value="#{receiptBackBean.selectedReceiptDetail.volHeight}" label="Vol Height:" size="5">
                        <f:convertNumber pattern="#0.00" />
                    </p:inputText>
                    <p:message for="newVolHeight" id="newVolHeightmsg" display="icon"/>

                    <h:outputLabel for="newVolLenght" value="Vol Lenght: " />
                    <p:inputText id="newVolLenght" value="#{receiptBackBean.selectedReceiptDetail.volLenght}" label="Vol Lenght:" size="5">
                        <f:convertNumber pattern="#0.00" />
                    </p:inputText>
                    <p:message for="newVolLenght" id="newVolLenghtmsg" display="icon"/>

                    <h:outputLabel for="newVolWidth" value="Vol Width: " />
                    <p:inputText id="newVolWidth" value="#{receiptBackBean.selectedReceiptDetail.volWidth}" label="Vol Width:" size="5">
                        <f:convertNumber pattern="#0.00" />
                    </p:inputText>
                    <p:message for="newVolWidth" id="newVolWidthmsg" display="icon"/>

                    <h:outputLabel for="newWeight" value="Weight: " />
                    <p:inputText id="newWeight" value="#{receiptBackBean.selectedReceiptDetail.weight}" label="Weight:" size="5">
                        <f:convertNumber pattern="#0.00" />
                    </p:inputText>
                    <p:message for="newWeight" id="newWeightmsg" display="icon"/>

                    <h:outputText value="Type: " />  
                    <p:selectOneMenu value="#{receiptBackBean.selectedReceiptDetail.type}">  
                        <f:selectItem itemLabel="Box" itemValue="B" />
                        <f:selectItem itemLabel="Pallet" itemValue="P" />
                    </p:selectOneMenu>

                    <p:separator/>

                    <p:commandButton value="Save" type="submit" update="frmNewReceiptDetailDialog" actionListener="#{receiptBackBean.saveReceiptDetail}" icon="ui-icon-check"/>  
                    <p:commandButton value="Close" 
                                     type="submit" 
                                     onclick="newReceiptDetailDialog.hide();" 
                                     label="Close" 
                                     process="@this" 
                                     actionListener="#{receiptBackBean.reset}" 
                                     title="Close" 
                                     update=":frmDialog" 
                                     icon="ui-icon-close"/>
                </h:panelGrid>
            </h:form>    
        </p:dialog>
    </h:body>
</html>